From b69f3742d50e9b2c101d9a57a09d94b174ab1ca2 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 1 Sep 2005 09:07:10 +0000 Subject: [PATCH] Use entry_get_paddr(l1e) to get the PFN Otherwise software used bits might get in the way. Signed-off-by: Arun Sharma --- xen/include/asm-x86/shadow_64.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xen/include/asm-x86/shadow_64.h b/xen/include/asm-x86/shadow_64.h index b4af0b3d51..fb555f6a00 100644 --- a/xen/include/asm-x86/shadow_64.h +++ b/xen/include/asm-x86/shadow_64.h @@ -450,7 +450,9 @@ static inline int guest_page_fault(struct vcpu *v, /* * If it's not external mode, then mfn should be machine physical. */ - mfn = __gpfn_to_mfn(d, (entry_get_value(gle) >> PAGE_SHIFT)); + mfn = __gpfn_to_mfn(d, (entry_get_paddr(gle) >> PAGE_SHIFT)); + if (mfn == -1) + return 1; lva = (pgentry_64_t *) phys_to_virt( mfn << PAGE_SHIFT); -- 2.30.2